package io.renren.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;

import cn.hutool.core.util.StrUtil;
import io.renren.core.dao.LearnKnowTypeDao;
import io.renren.core.dto.LearnKnowTypeDTO;
import io.renren.core.entity.LearnKnowTypeEntity;
import io.renren.core.service.LearnKnowTypeService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 知识库分类
 *
 * @author Ark 6980gong@gmail.com
 * @since 1.0.0 2024-05-04
 */
@Service
public class LearnKnowTypeServiceImpl extends CrudServiceImpl<LearnKnowTypeDao, LearnKnowTypeEntity, LearnKnowTypeDTO> implements LearnKnowTypeService {

    @Override
    public QueryWrapper<LearnKnowTypeEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<LearnKnowTypeEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}